package com.smartleanx.module.hrm.service.employee;

import javax.validation.*;

import com.smartleanx.module.hrm.controller.admin.employee.vo.EmployeeLeaveReqVO;
import com.smartleanx.module.hrm.dal.dataobject.employee.EmployeeSeparationRecordDO;

import java.util.Collection;
import java.util.List;

/**
 * 离职信息 Service 接口
 *
 * @author tengcj
 */
public interface EmployeeSeparationRecordService {

    /**
     * 创建离职信息
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    Long createEmployeeSeparationRecord(@Valid EmployeeLeaveReqVO createReqVO);

    /**
     * 更新离职信息
     *
     * @param updateReqVO 更新信息
     */
    void updateEmployeeSeparationRecord(@Valid EmployeeLeaveReqVO updateReqVO);

    void updateEmployeeSeparation(EmployeeSeparationRecordDO recordDO);

    /**
     * 删除离职信息
     *
     * @param id 编号
     */
    void deleteEmployeeSeparationRecord(Long id);

    /**
     * 获得离职信息
     *
     * @param id 编号
     * @return 离职信息
     */
    EmployeeSeparationRecordDO getEmployeeSeparationRecord(Long id);

    /**
     * 获取待离职列表（审批中）
     * @return
     */
    List<EmployeeSeparationRecordDO> getToBeSeparatedList();

    /**
     * 员工离职记录
     * @return
     */
    List<EmployeeSeparationRecordDO> getSeparatedList(Long employeeId);

    /**
     * 获取员工离职记录
     *
     * @param employeeIdList
     * @return
     */
    List<EmployeeSeparationRecordDO> getSeparationRecordList(Collection<Long> employeeIdList);

    /**
     * 获取员工最新离职记录
     * @return
     */
    List<EmployeeSeparationRecordDO> getSeparationRecordList();

    void deleteEmployeeSeparationRecordNew(Long id);
}
